import './index.scss'
import img1 from '@/assets/touqiang.png'
import img2 from '@/assets/quit.png'
import { useNavigate } from 'react-router-dom';
import MyContext from '../../utils/myContext.jsx';
import { useContext} from 'react';
const HeaderContent = ()=>{
    const store = useContext(MyContext)
    const navigator = useNavigate()
    return(<>
        <div className="topBar">
            <div className='barContent'>
                <div className='barArea'>
                    <span>北京市</span>
                </div>
                <div className='userInfo'>
                    <div className='user'>
                        
                        <img src={`/api/${store.userInfo.admin_img}`} alt="" />
                        <span>{store.userInfo.admin_nickname}</span>
                    </div>|
                    <div className='quit'>
                    <img src={img2} alt="" onClick={()=>{navigator('/login')}}/>
                    </div>
                </div>
            </div>
        </div>
    </>)
}
export default HeaderContent